package cn.hzc.fortess.system.dao;

import cn.hzc.fortess.system.entity.Project;
import cn.hzc.fortess.system.search.ProjectSearch;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProjectDao {

    int delete(Integer id);

    int deleteRelationByProject(Integer id);

    int insert(Project record);

    Project getById(Integer id);

    Project findExist(@Param("projectCode")String projectCode,@Param("projectName")String projectName);

    int update(Project record);

    List<Project> findAll(@Param("ids") List<Integer> ids);

    List<Project> findByLesseeId(Integer lesseeId);

    List<Project> page(ProjectSearch search);

    long count(ProjectSearch search);

    List<Integer> findMyProjectIds(Integer userId);

    List<Project> findProjectByUserRole(@Param("roleIds") List<Integer> roleIds);



}